﻿/**
 * @author sminutoli
 */
import com.dinmax.flash.utilities.movieclip.MovieClipUtils
import com.dinmax.flash.utilities.date.DateUtils
import com.dinmax.flash.draw.cabeza.ScrollCabeza

class com.dinmax.flash.central.bridge.WINDOWVoiceMessageBridge
extends com.dinmax.flash.draw.cabeza.WindowCabeza {
	
	private static var LINK_ID:String = "VoiceItem";
	
	public function drawItem(time:Date, from:String, url:String, state:String):MovieClip {
		//trace(" WINDOWVoiceMessageBridge.as | drawItem() ");
		//clip es el ITEM 
		var clip:MovieClip = super.drawItem(WINDOWVoiceMessageBridge.LINK_ID);
		
		var sTime:String = DateUtils.dateToString(time, DateUtils.date_DD_MM_AA, "-");
		sTime += " | ";
		sTime += DateUtils.hourToString(time, DateUtils.hour_HH_MM);
		clip.setDate(sTime);
		clip.setFrom(from);
		clip.setUrl(url);
		clip.setState(state);
		this.getScrollV().setStep(clip._height);
		
		return clip;
	};
	
	private function initScrollV():Void {
		super.initScrollV();
		this.getScrollV().setMouseWheel(true, this);
	};	
	
}